<?php
class Picture extends PicturePeer
{
	public static $prefixes = array(
		0	=>	'tour_price_',
		1	=>	'tour_ideas_',
		2	=>	'tour_ads_',
		3	=>	'loc_'
	);
	
	function Picture()
	{
		parent::PicturePeer();
	}
	
	function getPath($prefix='')
	{
		$path = $this->getup_dir().$prefix.$this->getname();
		return $path;
	}
	
	
	function deleteAllFiles()
	{
		unlink(dirname(dirname(dirname(__FILE__))).$this->getPath());
		$prefixes = self::$prefixes;
		foreach ($prefixes as $prefix)
			@unlink(dirname(dirname(dirname(__FILE__))).$this->getPath($prefix));
	}
}
?>